Add /dictate: voice input via ElevenLabs STT (mic → prompt) - #4
Merged
Merged
Conversation
New dictate_stt.py bridge records up to SPEECH_DICTATE_SECS (15 s) from the default mic via sox/arecord/ffmpeg, transcribes with ElevenLabs speech-to-text (scribe_v1), and prints the words to stdout as plain text for the /dictate command to deliver as the user's prompt. Fails soft everywhere: missing key, missing recorder, empty recording, or API errors print a "speech:" reason on stderr and exit 1 — the command surfaces the reason and never fabricates content. README, plugin manifest, and hooks.json description updated to cover the input side. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <[email protected]>
Owner
|
easy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the input side of the speech plugin:
/dictate— speak your prompt instead of typing it.hooks/dictate_stt.py— records up toSPEECH_DICTATE_SECS(default 15 s) from the default microphone viasox,arecord(ALSA), orffmpeg(macOS avfoundation), then transcribes with ElevenLabs speech-to-text (scribe_v1, override viaSPEECH_STT_MODEL) and prints the recognized words to stdout as plain text.commands/dictate.md— the/dictate [context]slash command: checks prerequisites (API key + a recorder) before recording, plays a listening cue, runs the bridge exactly once, and delivers the transcribed words as the user's request. Optional$ARGUMENTSframes the dictation (e.g. argument "refactor plan" + dictation "split the parser module").Contract
speech: …lines = the exact reason a step failedFail-soft verification
speech: set ELEVENLABS_API_KEY…on stderr, exit 1 ✅speech: no mic recorder found. Install sox…, exit 1 ✅Pair with the existing narration (
/speak, Stop-hook narrator) for full voice I/O. Base ismainwhere PR #2's speech plugin already landed.🤖 Generated with Codebuff